#pragma once
#include "Node.h"
#include <d3dx9.h>

class Frustum;
class AABB:public Node
{
	D3DXVECTOR4 min;
	D3DXVECTOR4 max;

public:
	AABB();
	AABB( D3DXVECTOR4 *vertices, unsigned int count );
	void Generate(D3DXVECTOR4 *vertices,  unsigned int count );
	void InFrustum( const Frustum& frustum);
	D3DXVECTOR4 GetMin();
	D3DXVECTOR4 GetMax();
	void RebuildAABB();

};